# A valid snippet should starts with:
#
#		snippet trigger_word [ "description" [ options ] ]
#
# and end with:
#
#		endsnippet
#
# Snippet options:
#
#		b - Beginning of line.
#		i - In-word expansion.
#		w - Word boundary.
#		r - Regular expression
#		e - Custom context snippet
#		A - Snippet will be triggered automatically, when condition matches.
#
# Basic example:
#
#		snippet emitter "emitter properties" b
#		private readonly ${1} = new Emitter<$2>()
#		public readonly ${1/^_(.*)/$1/}: Event<$2> = this.$1.event
#		endsnippet
#
# Online reference: https://github.com/SirVer/ultisnips/blob/master/doc/UltiSnips.txt
snippet lg "console.log" b
console.log('#$1', $2);
endsnippet

snippet ume "useMemo hook" b
const $1 = useMemo(() => {
	$2
}, [$3]);
endsnippet

snippet uef "useEffect hook" b
useEffect(() => {
	$1
}, [$2]);
endsnippet

snippet ucb "useCallback hook" b
const $1 = useCallback(($2) => {
	$3
}, [$4]);
endsnippet

snippet impsty "import less module style" b
import styles from './${VISUAL:index}.module.less';
endsnippet


snippet impcls "import classnames module" b
import clsx from 'classnames';
endsnippet

snippet uch "React Custom Hook" b
export interface I`!p snip.rv=capitalize_first(t[1])`Props {
}
export const $1 = (props: I`!p snip.rv=capitalize_first(t[1])`Props) => {
	const {} = props;
	return {};
};
endsnippet
